<!DOCTYPE html>
<html lang="zh">
<head>
  <th:block th:include="include :: header('基本表单')"/>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
  <div class="row">
    <div class="col-sm-12">
      <form class="form-horizontal" id="grid-typemapping-form" th:object="${data}">
        <input type="hidden" th:field="*{id}" placeholder="id"/>
        <div class="form-group">
          <label class="col-sm-3 control-label">字段类型: </label>
          <div class="col-sm-8">
            <input type="text" th:field="*{columnType}" placeholder="字段类型" class="form-control"/>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">属性类型: </label>
          <div class="col-sm-8">
            <input type="text" th:field="*{attrType}" placeholder="属性类型" class="form-control"/>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">包名称: </label>
          <div class="col-sm-8">
            <input type="text" th:field="*{packageName}" placeholder="包名" class="form-control"/>
          </div>
        </div>
      </form>
    </div>
  </div>
</div>
<th:block th:include="include :: footer"/>
<script type="text/javascript">
    var prefix = ctx + "gen/typemapping";

    function submitHandler() {
        var data = $("#grid-typemapping-form").serialize();
        $.ajax({
            cache : true,
            type : "put",
            url : prefix + "/update",
            data : data,
            async : false,
            error : function(req) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }

</script>
</body>
</html>
